//
//  BleSearchViewCell.m
//  Lightthings
//
//  Created by Hero on 2024/11/20.
//

#import "BleSearchViewCell.h"
#import "BleSearchModel.h"
@implementation BleSearchViewCell

- (void)setModel:(BleSearchModel *)model {
    [super setModel:model];
    
    self.nameLab.text = model.per.name;
    self.macAddress.text = model.per.macAddress;
    
    if (model.per.state == CBPeripheralStateConnected) {
        self.stateLab.hidden = NO;
    }else {
        self.stateLab.hidden = YES;
    }
    
    if (model.per.deviceType.intValue == 5) {
        self.icon.image = U_imageNamed(@"止鼾枕设备");
    }else {
        self.icon.image = U_imageNamed(@"icon_watch_style_2");
    }
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.layer.cornerRadius = 10;
    self.layer.borderColor = KLColor(@"999999").CGColor;
    self.layer.borderWidth = 1;
    
    // Initialization code
}

@end
